<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>招聘申请</title>
<script type="text/javascript" src="static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="static/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="static/easyui/themes/icon.css">
<link rel="stylesheet" href="static/easyui/themes/metro-red/easyui.css">
</head>
<body>
<style type="text/css">
.count-one{
		width:1100px;
		height:30px;
		display: block;
		margin:10px auto;
	}
	.count-three{
		float:right;
		width:220px;
		height:30px;
		margin-left:30px;
	}
	#setupzp{
		width: 100%;
		margin:auto;
	    overflow-x: auto;
	    margin-top: 5px;
	    border-collapse: collapse;
	    border: 1px solid #e4e7ec;
	    background-color: #fff;
   		color: gray;
   		font-size:12px; 
	}
	#setupzp thead{
		color: #19AA8D;
	    font-size: 14px;
	    font-weight: 700;
	} 
	#setupzp th{
		background: #6666661a;
	}
	#setupzp td{
		border: 1px solid #e4e7ec;
		width: 150px;
		height: 50px;
	}
.datagrid-header-row td{
		background: #E6E6E6;
		color: #19AA9C;
	    font-size: 14px;
	    font-weight: 700;
	    text-align: center;
	}
	.datagrid-row td{
		background: #fff;
		font-size: 12px;
		text-align: center;
	}
	.count-show{
		height:500px;
		margin:10px auto;
	}
.applybianji{
	background-color:#1AB394;
	color:white;
	border:none;
	width: 50px;
    height: 20px;
    margin-left:10px;
}
.icon-apply-bianji{
	padding-left: 20px;
	background:url('static/easyui/themes/icons/bianji.png') no-repeat 5% 50%;
	background-color:#13826B;
}
.applysc {
    background-color: #FF0000;
    color: white;
    border: none;
    width: 50px;
    height: 20px;
    cursor: pointer;
}
.applytg {
    background-color: #EA961F;
    color: white;
    border: none;
    width: 50px;
    height: 20px;
    cursor: pointer;
}
	#countbianji{
	width:400px;
	height:180px;
	border:solid 1px #DADADA;
	margin:auto;
}
.insertcontents{
	width:400px;
	height:160px;
	margin-top:10px;
}
.count-left{
	width: 300px;
    height: 110px;
    margin:20px auto;
}
.countone-right{
	width:240px;
	height:110px;
	float:right;
	margin-top:20px;
	margin-right:20px;
}
#creater{
	margin-left:12px;
}
#interviews{
	margin-left:-12px;
}
#check,#creater{
	margin-bottom: 10px;
}
.countanniu{
	width:160px;
	height:30px;
	margin:auto;
}
.icon-apply-queding {
    padding-left: 20px;
    background: url(static/easyui/themes/icons/queding.png) no-repeat 5% 50%;
    background-color: #EA961F;
}
.icon-apply-quxiao {
    padding-left: 20px;
    background: url(static/easyui/themes/icons/quxiao.png) no-repeat 5% 50%;
    background-color: #FF0000;
}
.countqx{
    width: 60px;
    background-color: #17AA8D;
    cursor: pointer;
    color: white;
    margin-left: 10px;
}
.countqd {
    width: 60px;
    background-color: #17AA8D;
    cursor: pointer;
    color: white;
    margin-left: 26px;
}
#counts-start,#counts-ends{
	width:200px;
	height:20px;
	}
.countone{
	margin-top:15px;
}
#setup-recruit{
		width:60px;
		height:22px;
		color:white;
		cursor: pointer;
	}
	.icon-count-setups{
		padding-left: 20px;
		border:none;
		background:url('static/easyui/themes/icons/edit_add.png') no-repeat 5% 50%;
	}
.icon-apply-fasong{
	padding-left: 20px;
	border:none;
	background:url('static/easyui/themes/icons/fasong.png') no-repeat 5% 50%;
}
.applydsh{
	background-color:#EA961F;
	color:white;
	border:none;
	width: 50px;
    height: 20px;
}
.icon-apply-songshen{
	padding-left: 20px;
	background-color:#EA961F;
	background:url('static/easyui/themes/icons/fasong.png') no-repeat 5% 50%;
}
</style>
<script type="text/javascript">			
function add(text){
	$("#content-admin").panel({
		href:text
	})
}
 //显示表格
	function sou(name){
		$("#setupzp").datagrid({
		    url:'select-apply',
		    queryParams:{
		    	Staff_name:name
		    },
		    columns:[[
		    	{field:'aa',checkbox:true,title:'选择',width:50},
		    	{field:'rapplyid',hidden:true,title:'编号',width:100},
		    	{field:'apply',title:'序号',width:80},
		    	{field:'rapplyname',title:'申请名称',width:200},
		    	{field:'rapplynums',title:'人数',width:90},
		    	{field:'rapplymoney',title:'费用',width:80},
		    	{field:'rapplyspstatue',title:'状态',width:80,hidden:true},
		    	{field:'rapplystart',title:'开始时间',width:160,align:'center',
		    		formatter:function(val,rec){
						return formattime(val);
			        }
				},
		    	{field:'rapplyend',title:'结束时间',width:160,align:'center',
		    		formatter:function(val,rec){
						return formattime(val);
			        }
				},
		    	{field:'cj',title:'创建人',width:100},
		    	{field:'sp',title:'审批人',width:100},
		    	{field:'caozuo',title:'操作',width:150,align:'center',
					formatter: function(value,row,index){
						if(row['rapplyspstatue']==0){
							return "<input type='button' class='applydsh icon-apply-songshen'style='width:60px;height: 20px;font-size:12px;border-radius:4px;color:#fff;background-color:#EA961F;cursor: pointer;' value='送审中'/>";
						}else if(row['rapplyspstatue']==1){
							return "<input type='button' class='applytg icon-apply-queding'style='width:60px;height: 20px;font-size:12px;border-radius:4px;color:#fff;background-color:#18A689;cursor: pointer;' value='已通过'/>";

						}else if(row['rapplyspstatue']==3){
							return "<input type='button' class='applysc icon-apply-quxiao'style='width:60px;height: 20px;font-size:12px;border-radius:4px;color:#fff;background-color:#FF0000;cursor: pointer;' value='已驳回'/>";
						}
					}
				}
		    	]],		          
		          pagination:true,
				    pageNumber:1,
				    pageSize:5,
				    pageList:[5,10,15]
		    });
	}
	$(function(){
		sou(null);
});
	//搜索
	function checkup(value,name){   
		sou($(".easyui-searchbox").val());
		}  
		//招聘统计中点击发起申请
		$("#setup-recruit").click(function(){
			add("recruitapply");
		})
		function formattime(value,row,index){
			var date = new Date(value);
			        var year = date.getFullYear().toString();
			        var month = (date.getMonth() + 1);
			        var day = date.getDate().toString();
			        var hour = date.getHours().toString();
			        var minutes = date.getMinutes().toString();
			        var seconds = date.getSeconds().toString();
			        if (month < 10) {
			            month = "0" + month;
			        }
			        if (day < 10) {
			            day = "0" + day;
			        }
			        if (hour < 10) {
			            hour = "0" + hour;
			        }
			        if (minutes < 10) {
			            minutes = "0" + minutes;
			        }
			        if (seconds < 10) {
			            seconds = "0" + seconds;
			        }
			        return year + "-" + month + "-" + day + " " + hour + ":" + minutes + ":" + seconds;
		}
</script>
	<div  class="biographical">
			<div class="count-one">
				<button id="setup-recruit" class="setupsq icon-count-setups"></button>
			<div class="count-three">
				<input class="easyui-searchbox" searcher="checkup" style="width:200px" data-options="prompt:'请输入创建人'"></input>
			</div>
			</div>
			<div class="count-show">
			<Form id="countsc" method="post">
				<table id="setupzp" class="easyui-datagrid" data-options="height:300">
				</table>
			</Form>
			</div>
		</div>
</body>
</html>